package cn.jdx.controller;

import cn.jdx.entity.User;
import cn.jdx.service.UserServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class MyController {
    @Resource
    private UserServiceImpl userServiceImpl;

    @RequestMapping("/select_users")
    //http://localhost:8080/select_users
    public List<User> select_users(){
        List<User> users = userServiceImpl.selectByExample(null);
        return users;
    }
}
